<%--
  Created by IntelliJ IDEA.
  User: WuLiangHang
  Date: 2021/12/13
  Time: 14:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>scope.jsp</h1>
<%
    //分别往4个域中存储数据
    pageContext.setAttribute("key", "pageContext");
    request.setAttribute("key", "request");
    session.setAttribute("key", "session");
    application.setAttribute("key", "application");
%>
pageContext 中保存的值是:<%=pageContext.getAttribute("key")%><br/>
request 中保存的值是:<%=request.getAttribute("key")%><br/>
session 中保存的值是:<%=session.getAttribute("key")%><br/>
application 中保存的值是:<%=application.getAttribute("key")%><br/>

<%
    request.getRequestDispatcher("/demo1213/scope2.jsp").forward(request, response);
%>
</body>
</html>
